-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stats tracking using CVal for starboard storage and file writes f… #707
Conversation
a62a143
to
2674c61
Compare
There are some related test failures: "Check failed: false. StatsTracker is not defined.". Could you fix that? |
2674c61
to
01bca7c
Compare
Codecov Report
@@ Coverage Diff @@
## main #707 +/- ##
=======================================
Coverage 56.89% 56.89%
=======================================
Files 1898 1899 +1
Lines 94090 94110 +20
=======================================
+ Hits 53528 53541 +13
- Misses 40562 40569 +7
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good to me. Would love Kaido or Yavor to take a look as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how solid the idea of adding another API layer to call Starboard here looks like. It does look to me like most call sites could be trivially updated to simply use base::File
that routes to Starboard underneath - except in very few limited places. @andrewsavage1 please have a look as well, wdyt ?
The stats tracking could then be entirely contained only in base::File
with maybe another place or two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does look to me like most call sites could be trivially updated to simply use base::File that routes to Starboard underneath - except in very few limited places
I actually didn't see any places that couldn't use base::File, I definitely think that's a good option.
@kaidokert
If I can limit |
52c0dca
to
b8c6180
Compare
So this is going in good direction, but now looking at it - would you be able to split out the PR that changes SbFile->base::File into a standalone submit ? That way we can quickly ensure that it landed as a no-op and didn't disrupt any of the more finicky platforms internally. |
@kaidokert I split this up. This PR doesn't replace calls to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise this looks okay to me now. Two things - now that @y4vor is back, i'd like him to have a look at the general concept. Note, the assumption is that we will only have base::File calling StarboardFile, all other call sites will be migrated to use base::File.
So really the two remaining call sites to increment those counters are going to be base/files/file_starboard.cc
and cobalt/storage/savegame_starboard.cc
.
Second, for some reason i'm not very keen on having a top-level starboard_stats/
module. I logically understand it should be above starboard/
and below base/
in the chain of dependencies. I'd still love to move it to starboard/common
or a little more tucked away.
I almost wonder if statstracker interface starboard_stats::StatsTracker
class couldn't simply be replaced with two simple callback functions or observers ?
I'm okay with moving |
81c4977
to
1c5678f
Compare
1c5678f
to
65ef806
Compare
…rom cobalt. b/277761317 Change-Id: Iabc8bf97772cfa42d9f0f0425eeef91376e4044d
65ef806
to
dcdc1c0
Compare
…age and file writes f… (#1128) Refer to the original PR: #707 …rom cobalt. b/277761317 Change-Id: Iabc8bf97772cfa42d9f0f0425eeef91376e4044d Co-authored-by: aee <[email protected]>
…rom cobalt.
b/277761317
Change-Id: Iabc8bf97772cfa42d9f0f0425eeef91376e4044d